home *** CD-ROM | disk | FTP | other *** search
/ Chip 2003 February / Chip_2003-02_cd1.bin / zkuste / xptools / install / Xsetup / setup.exe / {app} / plugins / XQ Win2K Start Menu 1.xpl < prev    next >
Text File  |  2002-11-22  |  3KB  |  120 lines

  1. "FILE"="Xteq Systems X-Setup Plugin 6.0"
  2. "TYPE"="9"
  3. "COUNT"="1"
  4. "UIPATH"="Appearance\Start menu\Windows 2000"
  5. "NAME"="Visible Items"
  6. "VERSION"="2.10"
  7. "LANGUAGE"="VBScript"
  8. "OSVERSION"="0001"
  9. "TEXT 1"="Aha! You can't see this!"
  10. "DESCRIPTION 1"="Use this plug-in to show or hide some of the items in the Start menu."
  11. "DESCRIPTION 2"="NOTE: Hiding the Run option will not disable the WINDOWS+R key combination, so users will still be able to access the Run command."
  12. "AUTHOR"="Xteq Systems (Neil R. Turner)"
  13. "CONTACTURL"="http://www.xteq.com/"
  14. "COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved"
  15. "COMMENT 1"="Thanks to SIMONORORKE for the Windows 2000 Logoff option!"
  16.  
  17.  
  18.  sP="HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\"
  19. sP2="HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\"
  20.  
  21. sV1=sP2 & "StartMenuFavorites"
  22. sV2=sP & "NoRecentDocsMenu"
  23. sV3=sP2 & "StartMenuRun" '<>!
  24. sV4=sP & "NoClose"
  25. sV5=sP & "NoFind"
  26. sV6=sP2 & "StartMenuLogoff" '<>!
  27. sV7=sP & "NoSMHelp"
  28. sV8=sP & "NoSMConfigurePrograms"
  29.  
  30.  
  31. SUB Plugin_Initialize
  32.  Call SetUIElement(1,"Favorites")
  33.  Call ReadIt_2(1,sV1)
  34.  
  35.  Call SetUIElement(2,"Documents")
  36.  Call ReadIt(2,sV2)
  37.  
  38.  Call SetUIElement(3,"Run...")
  39.  Call ReadIt_2(3,sV3)
  40.  
  41.  Call SetUIElement(4,"Shut Down...")
  42.  Call ReadIt(4,sV4)
  43.  
  44.  Call SetUIElement(5,"Search") 
  45.  Call ReadIt(5,sV5)
  46.  
  47.  Call SetUIElement(6,"Log Off <username>...")
  48.  Call ReadIt_2(6,sV6)
  49.  
  50.  Call SetUIElement(7,"Help")
  51.  Call ReadIt(7,sV7)
  52.  
  53.  Call SetUIElement(8,"Set Program Access and Defaults (SP3)")
  54.  Call ReadIt(8,sV8)
  55. END SUB
  56.  
  57. 'Called when the Plugin should apply the changes
  58. SUB Plugin_Apply(ElementIndex,ElementSubIndex) 
  59.  Call WriteIt_2(1,sV1)
  60.  Call WriteIt(2,sV2)
  61.  Call WriteIt_2(3,sV3)
  62.  Call WriteIt(4,sV4)
  63.  Call WriteIt(5,sV5)
  64.  Call WriteIt_2(6,sV6)
  65.  Call WriteIt(7,sV7)
  66.  Call WriteIt(8,sV8)
  67.  
  68.  Call IndicateSettingChange()
  69. END SUB
  70.  
  71. Sub ReadIt(ITM,PATH1)
  72.  if RegValueExists(PATH1)=false then 'setting available?
  73.     'no setting -> item visible
  74.     Call SetUIElementEx(ITM,true)
  75.  else
  76.     i=RegReadValue(PATH1)
  77.     if i=0 then 
  78.        Call SetUIElementEx(ITM,true)
  79.     end if
  80.  end if
  81. End Sub
  82.  
  83. Sub ReadIt_2(ITM,PATH1)
  84.  if RegValueExists(PATH1)=false then 'setting available?
  85.     'no setting -> item not visible
  86.     Call SetUIElementEx(ITM,false)
  87.  else
  88.     i=RegReadValue(PATH1)
  89.     if i=1 then 
  90.        Call SetUIElementEx(ITM,true)  
  91.     end if
  92.  end if
  93. End Sub
  94.  
  95.  
  96. Sub WriteIt(ITM,PATH1)
  97.  b=GetUIElementEx(ITM)
  98.  if b=true then
  99.  
  100.     s=RegReadValue(PATH1)
  101.     if IsEmpty(s)=false then
  102.        Call RegDeleteValue(PATH1)
  103.     end if
  104.  
  105.  else
  106.     Call RegWriteValue(PATH1,1,2)
  107.  end if
  108. End Sub
  109.  
  110. Sub WriteIt_2(ITM,PATH1)
  111.  b=GetUIElementEx(ITM)
  112.  if b=true then
  113.     Call RegWriteValue(PATH1,1,2)
  114.  else
  115.     Call RegWriteValue(PATH1,0,2)
  116.  end if
  117. End Sub
  118. SUB Plugin_Terminate
  119. END SUB
  120.